export function getHrefSearch() {
  const { href } = window.location;
  const query = href.slice(href.indexOf('?') + 1, href.length).split('&');

  return query.reduce((pre, cur) => {
    const pair = cur.split('=');
    Object.assign(pre, { [pair[0]]: decodeURI(pair[1]) });
    return pre;
  }, {});
}
